package com.example.listener;



import jakarta.servlet.annotation.WebListener;
import jakarta.servlet.http.HttpSessionEvent;
import jakarta.servlet.http.HttpSessionListener;

@WebListener
public class ListenerDemo implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent se) {       
        System.out.println("session 已创建");
    }
    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
        System.out.println("session 已销毁");
    }
}
